1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a program which provide an image with an extended region of a size suitable for performing block processing.
2. Description of the Related Art
Recent copiers have rapidly expanded their functions and improved image quality as digitization advances with image processing inside copiers (internal image processing). In an attempt to provide highly enhanced reproducibility of documents, internal image processing has constantly undergone improvements in resolution from 600 dpi through 1200 dpi to 2400 dpi and in the number of signal bits from 8 bits through 10 bits to 12 bits. Under these circumstances, internal image processing may be performed as band processing, e.g., filtering may be performed when a pixel of interest requires the data of its neighboring pixels. To perform such processing, a massive memory capacity for storing such data will be required depending on the resolution and the number of signal bits.
In this context, as an alternative technique to band processing, attention has now focused on block processing. Block processing is a technique for dividing an input image into regions (blocks) of a certain size to perform image processing block by block. Block processing may be adopted to perform, e.g., filtering which requires the data of surrounding pixels. In this case, some overlapping regions of neighboring blocks need to be added to the periphery of the processed block.
The above-described added overlapping region (extended region) is determined uniquely depending on the filter size. When image processing is performed several times, the extended region is determined as the sum of the extensions required for the respective image processing steps. A certain extended region defined by the filter size is provided to a block, thereby produced is the block attached with the extension for executing block processing. Such block processing makes it possible to significantly reduce the required amount of memory compared with band processing and also enables parallel processing (Japanese Patent Laid-Open No. 2002-288654 and Japanese Patent Laid-Open No. 2000-312311.)
However, the above-described conventional technique inevitably requires to always provide an image with a certain extended region even when internal image processing or a parameter such as a filter coefficient is modified according to the settings of print quality and printing modes or the types of the object of an input image.
It was thus inevitable to provide not only the least amount of required minimum extended region but also the excessive extended region (redundant data region) with respect to the internal image processing and the parameters. This problem caused degradation in efficiency at the time of data transfer and in processing performance.
FIG. 1A and FIG. 1B show examples of the problem with the conventional technology. The conventional technique generates a processed block 804 of 40×40 pixels because an extended region 803 of 4 pixels in width around the block is required to place a filter 802 of 9×9 pixels on a block 801 of 32×32 pixels.
Now, consider the case where the parameters are changed to use a filter 805 of 5×5 pixels instead of the filter 802 of 9×9 pixels. In this case, the amount of a required minimum extended region 806 has a 2-pixel width around the block, and thus a processed block 807 of 36×36 pixels is preferably generated. However, if the system has been designed so as not to allow a change in processing, then even after the parameter has been changed, the size of the extended region 803 required before the parameter is changed cannot be modified. Therefore, a redundant data region 808 to the periphery of the inevitable extended region 806 must be provided. As a result, the redundant data region 808 will be processed unnecessarily, this results in degradation in efficiency at the time of data transfer and in processing performance.
The present invention has been developed in view of the above-described problems. It is therefore an object of the present invention to prevent degradation in transfer efficiency and processing performance by computing the size of a required extended region according to an input image or a user's printer setting to generate efficient processed blocks.